import request from '@/utils/request'

// 获取所有广告位
export const getAllAdvertSpace = () => {
  return request({
    method: 'GET',
    url: '/front/ad/space/getAllSpaces'
  })
}

// 新增或者修改广告位·
export const getSaveOrUpdateAdvertspace = data => {
  return request({
    method: 'POST',
    url: '/front/ad/space/saveOrUpdate',
    data
  })
}

// 根据id获取广告位
export const getSpaceById = id => {
  return request({
    method: 'GET',
    url: `/front/ad/space/getSpaceById/${id}`
  })
}
